<?php

namespace Modules\System\Http\Controllers\Admin;

use Illuminate\Routing\Controller;
use Modules\System\Traits\Backend;

class Base extends Controller
{
    //增删改查基类
    use Backend;

    public function __construct(){

        $class = explode("\\",get_called_class());
        $this->class = end($class);
        $this->models->primaryKey = $this->models->primaryKey ?? "id";
        $this->Modules = "system";

        view()->share('Modules',$this->Modules);
        view()->share('class',$this->class);
        view()->share('id',$this->models->primaryKey);
        view()->share('table',$this->models->table);

    }


}
